<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px;
            width: 80%; margin: auto}
        table, th, td {border: 0px solid darkslategray;padding: 10px}
        .btgn{
            font-family: 华文行楷;
            font-size: 16px;
            color: #255e95;
            background-color: #99CCFF;
            text-align: center;
        }

        tr:nth-child(2n){
            background-color:#FFCC99;
        }
        tr:nth-child(2n+1) {
            background-color: #99CC99;
        }
    body{
        background: skyblue;
    }

    </style>
</head>
<body>
<div style="text-align: center">
    <span class="span" style="color: deepskyblue; font-size: 25px">欢迎登录!</span>
    <br/>
    <table class="list">
        <tr>
            <th class="btgn">id</th>
            <th class="btgn">用户名</th>
            <th class="btgn">密码 </th>
            <th class="btgn"> 姓名</th>
            <th class="btgn"> 年龄</th>
            <th class="btgn"> 操作</th>


        </tr>
        <tr th:each="user : ${all}">
            <td th:text="${user.id}"></td>
            <td th:text="${user.username}"></td>
            <td th:text="${user.password}"></td>
            <td th:text="${user.tname}"></td>
            <td th:text="${user.age}"></td>
            <td><a th:href="@{'/delete/'+${user.id}}"><input type="submit" value="删除用户"></a></td>
        </tr>
    </table>
    <a href="Add1">
        <input type="submit" value="新增用户">
    </a>

</div>
</body>
</html>